unit SmallStruct.Model.TSSDynamicModel;

interface

uses Classes,
  SmallStruct.Model,
  SmallStruct.Model.TSSModel,
  SmallStruct.Tools;

type
  TSSDynamicModel = class(TSSModel, ISSDynamicModel)
  private
    _Data: ISSRecord;
  public
    function GetData: ISSRecord;
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

implementation

{ TSSDynamicModel }

constructor TSSDynamicModel.Create(AOwner: TComponent);
begin
  inherited;
  _Data := TSSRecord.Create(Self);
end;

destructor TSSDynamicModel.Destroy;
begin
  _Data.ReleaseObjectInstance;
  inherited;
end;

function TSSDynamicModel.GetData: ISSRecord;
begin
  Result := _Data;
end;

end.
